package com.sample.weather3dwidget;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Style;
import android.util.AttributeSet;
import android.view.View;

public class ClockView extends View
{
  private float length = getResources().getDimensionPixelOffset(R.dimen.line_length);
  private Paint mPaint = new Paint(1);
  private float width = getResources().getDimensionPixelOffset(R.dimen.line_width);

  public ClockView(Context paramContext)
  {
    super(paramContext);
  }

  public ClockView(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
  }

  public ClockView(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
  {
    super(paramContext, paramAttributeSet, paramInt);
  }

  protected void onDraw(Canvas paramCanvas)
  {
    this.mPaint.setStyle(Paint.Style.STROKE);
    this.mPaint.setStrokeWidth(this.width);
    this.mPaint.setStrokeCap(Paint.Cap.ROUND);
    this.mPaint.setColor(-1);
    paramCanvas.drawCircle(getWidth() / 2, getHeight() / 2, getWidth() / 2 - this.width, this.mPaint);
    this.mPaint.setStyle(Paint.Style.FILL);
    this.mPaint.setColor(872415231);
    paramCanvas.drawCircle(getWidth() / 2, getHeight() / 2, getWidth() / 2 - this.width, this.mPaint);
  }

  protected void onMeasure(int paramInt1, int paramInt2)
  {
    super.onMeasure(paramInt1, paramInt2);
    int i = Math.min(getMeasuredHeight(), getMeasuredWidth());
    setMeasuredDimension(i, i);
  }
}